headerbar: Don't change the custom title's valign
authorAdrien Plazas <kekun.plazas@laposte.net>
Thu, 4 Jul 2019 11:03:37 +0000 (13:03 +0200)
committerAdrien Plazas <kekun.plazas@laposte.net>
Thu, 4 Jul 2019 11:03:37 +0000 (13:03 +0200)
This allows custom titles to use the vertical alignment of their choice
without having to set it manually after it has been added to the header
bar, hence allowing them to define their preferred alignment from a UI
template.

This is useful for widgets like the view switcher which requires filling
the header bar's whole height.

gtk/gtkheaderbar.c

index 35553835a87434ea8ab990498d5c1a33c154a886..d5ba561f61b35dfcba23a93fcc82804e2e1bd0f2 100644 (file)
@@ -1356,7 +1356,6 @@ gtk_header_bar_set_custom_title (GtkHeaderBar *bar,
 
       gtk_header_bar_reorder_css_node (bar, GTK_PACK_START, priv->custom_title);
       gtk_widget_set_parent (priv->custom_title, GTK_WIDGET (bar));
-      gtk_widget_set_valign (priv->custom_title, GTK_ALIGN_CENTER);
 
       if (priv->label_box != NULL)
         {